POV-Ray : Newsgroups : povray.unofficial.patches : Patch enhancement request - Trace keyword : Stacking spheres - was Re: Patch enhancement request - Trace keyword Server Time
2 Sep 2024 02:18:23 EDT (-0400)
  Stacking spheres - was Re: Patch enhancement request - Trace keyword  
From: SamuelT
Date: 30 Jun 2000 16:14:10
Message: <395D0070.5525367B@aol.com>
Okay, I tried the idea, and it works, but pov crashes if I go through 200 or
more loops. Here is my code:


#$ X=0; #$ Y=0; #$ Num=0; #$ Z=0; #$ Norm=<0,0,0>; #$ R=seed(75);
#$ SlopeV=.9999975;

#declare Obj=
  box{<-2,-1,-2>,<2,0,2> pigment{rgb 1}}

#while(Num<100)
 #$ X=rand(R)*4-2; #$ Z=rand(R)*4-2;
 #$ Vect=trace( Obj, <X,100,Z>, -y );
 #local Obj=
  union{
   sphere{<X,Vect.y+.1,Z>,.1 pigment{rgb 1}}
   #object{Obj}
  }
 #$ Num=Num+1;
#end

#object{Obj}

~Samuel


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.